﻿using MicroOrm.Dapper.Repositories.Repositories;
using MicroOrm.Dapper.Repositories.SqlGenerator.Interfaces;
using MyServices.Models.Data;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

namespace MyServices.Models
{
    public class CategoryRepository : DapperRepository<Categories>
    {
        public CategoryRepository(IDbConnection connection, ISqlGenerator<Categories> generator) : base(connection, generator) { }

        public override async System.Threading.Tasks.Task<bool> InsertAsync(Categories instance)
        {
            try
            {
                return await base.InsertAsync(instance);
            }
            catch (Exception ex)
            {
                Log.Instance.Error(ex.Message, ex);
                return false;
            }
        }
    }
}